package com.property.manage.dao.owner;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.property.manage.model.owner.OwnerEntity;
import com.property.manage.model.owner.OwnerVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 描述
 *
 * @author lwb
 * @since 2020/7/15
 */
@Repository
public interface OwnerMapper extends BaseMapper<OwnerEntity> {
    IPage<OwnerVo> getOwner(@Param("page") Page<OwnerVo> page, @Param("ownerName") String ownerName, @Param("quarterId")Integer quarterId,
                            @Param("phone") String phone,@Param("type")Integer type,
                            @Param("building")Integer building, @Param("unit") Integer unit, @Param("roomNumber") String roomNumber);
   Integer getOwnerCount(@Param("type")Integer type,@Param("villageId")Integer villageId);
   OwnerVo getOwnerById(@Param("id") Integer id);
   void saveList(@Param("ownerEntities") List<OwnerEntity> ownerEntities);
}
